﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;

namespace SCOSub
{
    public partial class FrameThumb : UserControl
    {
        int framenumber;
         Bitmap bmp;
         int thumbID;
       public FrameThumb[] ftarray;

        public FrameThumb()
        {
            InitializeComponent();
        }
        /*public FrameThumb(int thumbid,FrameThumb[] ft)
        {
            InitializeComponent();
            ThumbID = thumbid;
            ftarray = ft;
        }*/
        public int ThumbID
        {
            get
            {
                return thumbID;
            }
            set
            {
                thumbID = value;
            }
        }
        public int FrameNumber
        {
            get
            {
                return framenumber;
            }
            set
            {
                framenumber = value;
                framenumberlabel.Text = value.ToString();
            }
        }
        public Bitmap FrameBMP
        {
            get
            {
                return bmp;
            }
            set
            {
                bmp = value;
                pictureBox1.Image = value;
            }
        }
        public void setBgColor(Color color)
        {
            this.BackColor = color;
            for (int i = 0; i < 24; i++)
            {
                if (ftarray[i].ThumbID != this.thumbID)
                    ftarray[i].BackColor = Color.FromArgb(0xc0, 0xc0, 0xc0);
            }
            LyricViewr.LastSelectedThumbID = thumbID;
        }

        private void framenumberlabel_MouseDown(object sender, MouseEventArgs e)
        {
            setBgColor(Color.Blue);
        }

        private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
        {
            setBgColor(Color.Blue);
        }

        private void FrameThumb_MouseDown(object sender, MouseEventArgs e)
        {
            setBgColor(Color.Blue);
        
        }
    


    }
}
